package com.hunan.api.catv.entity.enums;

public enum DingType {

    android(1, "androidException"),

    cms(2, "cmsException"),

    api(3, "apiException");

    private final Integer code;

    private final String msg;


    DingType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static DingType getResult(int code) {
        DingType[] rcs = DingType.values();
        for (DingType rc : rcs) {
            if (rc.getCode() == code) {
                return rc;
            }
        }
        return null;
    }
}
